Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

The Preview Resource Item Structure

The preview resource item structure is an array that allows you to store an unlimited number of additional pieces of file information. Each piece of data contains a reference to its information using the structure defined by the pnotResItem data type, which is shown in Listing 4 .

Listing 4 The preview resource item structure

typedef struct pnotResItem {
    unsigned long       modDate;    /* last modification date of item */
    OSType              useType; /* what type of data */
    OSType              resType;    /* resource type containing item */
    short               resID;      /* resource ID containing this item */
    short               rgnCode;    /* region code */
    long                reserved;/* set to 0 */
} pnotResItem; *pnotResItemPtr;

Field descriptions

modDate
Contains the modification time (in standard Macintosh seconds since midnight, January 1, 1904) of this item. This parameter allows you to find out if the item is out of date with the rest of the items in the array.
useType
Indicates the meaning of the data pointed to by this item. Two values are currently defined for this field.
KeyW
Indicates that this item points to a list of keywords, typically stored in an 'STR#' resource.
Desc
Indicates that the item points to a brief text description of the file, typically stored in a 'TEXT' resource.
Developers are encouraged to expand the list of types to include additional relevant kinds of information.
resType
Contains the type of a resource used as a preview cache for the file associated with the given item. The type of the resource determines which preview component should be used to display the preview.
resID
Contains the identification number of a resource used as a preview cache for the specified file.
rgnCode
Contains the region code for this item.
reserved
Reserved for use by Apple. Set this field to 0.

© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next